package fr.bugtracker.bean.administration.systeme;

import java.util.List;

import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;

import fr.bugtracker.bean.AbstractBean;
import fr.bugtracker.entity.technique.ParametreApplication;
import fr.bugtracker.service.administration.systeme.SrvParametreApplication;

/**
 * Bean permettant de gérer les paramètres application
 * @author Laurent
 * @version 0.1
 */
@ManagedBean
@ViewScoped
public class BeanParametreApplication extends AbstractBean {

	/**
	 * service ejb pour les paramètres de l'application
	 */
	@EJB
	private SrvParametreApplication srvParametreApplication;
	/**
	 * liste des paramètres de l'application
	 */
	private List<ParametreApplication> listeParametreApplication;

	/**
	 * Constructeur de la classe <code>BeanParametreApplication</code>.
	 */
	public BeanParametreApplication() {
	}

	/**
	 * @see fr.bugtracker.bean.AbstractBean#initialisation()
	 */
	@Override
	public void initialisation() {
		listeParametreApplication = srvParametreApplication.getAllParametreApplication();
	}

	/**
	 * <p><b>Accès en lecture à l'attribut listeParametreApplication.</b></p>
	 * @return Retourne l'attribut listeParametreApplication sous forme de <code>List<ParametreApplication></code>.
	 */
	public List<ParametreApplication> getListeParametreApplication() {
		return this.listeParametreApplication;
	}

	/**
	 * <p><b>Accès en écriture à l'attribut listeParametreApplication.</b></p>
	 * @param listeParametreApplication L'attribut listeParametreApplication à modifier.
	 */
	public void setListeParametreApplication(List<ParametreApplication> listeParametreApplication) {
		this.listeParametreApplication = listeParametreApplication;
	}

}
